/*
 * Copyright 2006-2023 ahtelit.com, All Rights Reserved.
 */

package com.telit.firecommand.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import java.io.Serializable;
import java.util.List;


/**
 * IOT设备
 *
 * @author yuezhuang
 * @since 2023-04-27
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "IotDevice", description = "IOT设备")
public class IotDevice implements Serializable {

    private static final long serialVersionUID = -1L;

    @ApiModelProperty(value = "ID", required = true)
    private Long id;

    @ApiModelProperty(value = "行政区划编码")
    private String districtCode;

    @ApiModelProperty(value = "行政区划名称")
    private String districtName;

    @ApiModelProperty(value = "外部ID")
    private String mockId;

    @ApiModelProperty(value = "设备SN")
    private String sn;

    @ApiModelProperty(value = "名称")
    private String name;

    @ApiModelProperty(value = "设备小类")
    private String type;

    @ApiModelProperty(value = "设备型号")
    private String model;

    @ApiModelProperty(value = "设备大类")
    private String category;

    @ApiModelProperty(value = "设备大类名称")
    private String categoryName;

    @ApiModelProperty(value = "网络状态")
    private boolean networkStatus;

    @ApiModelProperty(value = "设备状态， 枚举值\n"
            + "● NORMAL: 正常\n"
            + "● ALARM: 报警\n"
            + "● DANGER: 隐患\n"
            + "● FAULT: 故障\n"
            + "● ISOLATION: 故障隔离\n"
            + "● DISCONNECT: 失联")
    private String status;

    @ApiModelProperty(value = "创建时间")
    private String createdTime;

    @ApiModelProperty(value = "部署时间")
    private String deployedTime;

    @ApiModelProperty(value = "地址")
    private String location;

    @ApiModelProperty(value = "经度")
    private String longitude;

    @ApiModelProperty(value = "纬度")
    private String latitude;

    @ApiModelProperty(value = "图片")
    private String imageUrl;

    @ApiModelProperty(value = "设备型号")
    private String skuName;

    @ApiModelProperty(value = "报警状态")
    private String alarmState;

    @ApiModelProperty(value = "故障状态")
    private String faultState;

    @ApiModelProperty(value = "数据集合")
    @TableField(exist = false)
    private List<IotData> iotDataList;

}
